﻿with cityConfig as
(
	select secFrom = 0, secTo = 1, City = 'ROMA' union
	select secFrom = 2, secTo = 3, City = 'MILANO' union
	select secFrom = 4, secTo = 5, City = 'NAPOLI' union
	select secFrom = 6, secTo = 7, City = 'TORINO' union
	select secFrom = 8, secTo = 9, City = 'PALERMO' union
	select secFrom = 10, secTo = 11, City = 'GENOVA' union
	select secFrom = 12, secTo = 13, City = 'BOLOGNA' union
	select secFrom = 14, secTo = 15, City = 'FIRENZE' union
	select secFrom = 16, secTo = 17, City = 'BARI' union
	select secFrom = 18, secTo = 19, City = 'CATANIA' union
	select secFrom = 20, secTo = 21, City = 'VENEZIA' union
	select secFrom = 22, secTo = 23, City = 'VERONA' union
	select secFrom = 24, secTo = 25, City = 'MESSINA' union
	select secFrom = 26, secTo = 27, City = 'PADOVA' union
	select secFrom = 28, secTo = 29, City = 'TRIESTE' union
	select secFrom = 30, secTo = 31, City = 'TARANTO' union
	select secFrom = 32, secTo = 33, City = 'BRESCIA' union
	select secFrom = 34, secTo = 35, City = 'PRATO' union
	select secFrom = 36, secTo = 37, City = 'PARMA' union
	select secFrom = 38, secTo = 39, City = 'MODENA' union
	select secFrom = 40, secTo = 41, City = 'REGGIO CALABRIA' union
	select secFrom = 42, secTo = 43, City = 'REGGIO EMILIA' union
	select secFrom = 44, secTo = 45, City = 'PERUGIA' union
	select secFrom = 46, secTo = 47, City = 'LIVORNO' union
	select secFrom = 48, secTo = 49, City = 'RAVENNA' union
	select secFrom = 50, secTo = 51, City = 'CAGLIARI' union
	select secFrom = 52, secTo = 53, City = 'FOGGIA' union
	select secFrom = 54, secTo = 55, City = 'RIMINI' union
	select secFrom = 56, secTo = 57, City = 'SALERNO' union
	select secFrom = 58, secTo = 59, City = 'FERRARA'
)
select 
	City, 
	OrderValue = round(rand() * 100, 2), 
	OrderDate = getdate() 
from 
	cityConfig 
where 
	datepart(second, getdate()) between secFrom and secTo